<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>

		<script>
			var dt = new Date();

			function getDaysInOneMonth(year, month) {
				month = parseInt(month, 10);
				var d = new Date(year, month, 0);
				return d.getDate();
			}

			console.log(getDaysInOneMonth(2020, 2))

			var str = "Wed Jun 28 2017 00:00:00 GMT+0800 (中国标准时间)";
			/*	
				//如果需要带0 例如：06月28日
				function formatDate(_dt) {
					_dt = new Date(_dt);
					var _yyyy = _dt.getFullYear();
					var _mm = _dt.getMonth() + 1;
					var _dd = _dt.getDate();
					if(_mm < 10) {
						_mm = "0" + _mm;
					}
					if(_dd < 10) {
						_dd = "0" + _dd;
					}
					return(_mm + "月" + _dd + "日");
				}
				console.log(formatDate(str))*/
		</script>
	</body>

</html>